#version 120
attribute vec3  VertexPosition;
attribute float VertexStartTime;

varying float Transp;       // To fragment shader

uniform float Time;     // Animation time
uniform float ParticleLifetime; // Max particle lifetime

uniform mat4 MatrixModel;
uniform mat4 MatrixView;
uniform mat4 MatrixProjection;

varying float yell; //is it yellow?

void main()
{
  float age = Time - VertexStartTime;
  Transp = 1.0 - age / ParticleLifetime;
  gl_Position = MatrixProjection * MatrixView * MatrixModel *
                vec4(VertexPosition, 1.0);
  yell = abs(VertexPosition.x)+abs(VertexPosition.z);
}